import os


def func1():
    x = range(1, 13)
    y = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

    i = 0
    for mon in x:
        for d in range(1, y[i]+1):
            if mon * 29 + d * 24 == 900:
                return (mon, d)
        i += 1

    return (0, 0)


if __name__ == '__main__':

    print(func1())